import { MockMethod } from 'vite-plugin-mock'

const orderTrack = [
  {
    order_no: '20230601004', //订单号
    order_status: '0',
    order_status_str: '草稿', //订单状态
    buyer: '青岛美多乐有限公司', //买方
    cgje: '325', //采购金额
    cgsl: '4239.40', //采购数量
    fptt: '青岛美多乐有限公司', //发票抬头
    shzt: '1', //售后状态
    shzt_str: '退货',//
    shdz: '山东省青岛市城阳区流亭街道', //收货地址
    affairs: '--',
    seller: '伊拉克', //卖方
    create_time: '2023-07-28 14:22:23', //创建时间
    create_p: 'Tom', //创建人
    qwys_type: '1', //期望运输方式
    kplx_type: '1', // 期望付款方式
    address: '西仲花园18号楼6单元703', //详细地址
    phone: '17852363575', //联系电话
    kplx: '1', //开票类型
    gssh_num: '123456', // 公司税号
    fp_type: '1', //发票类型
    shlx_p: '李白', //收货联系人
    sales_status: '0', //售后状态
    sales_status_str: '取消订单', //售后状态 取消订单、退款、退货退款、换货
    goods_name: '产品名称A', //产品名称
    brand: 'KATO-KATO',// 品牌
    productList:[
      { 
        brand: 'KATO-KATO', //品牌
        product_code: '1000a1', //产品编码
        product_name: 'KATO元气咻咻遮瑕液01杏仁奶',//产品名称
        selling_price: '8.00', //售价金额
        purchase_quantity: 4,  //采购数量
        purchase_price: '8.00',// 采购金额
        text: '备注',
        leve1_class: '一级类目A',
        leve2_class: '二级类目A',

        price:'9.00', //售价
        discount: 0.2, //折扣
        sales_price: '8.00', //销售金额
        product_status_str: '彩妆', //产品类型
        create_time: '2023-7-28 15:22:22',
        seller_text: '', //卖方备注
        batch_number: '100001', //批次号
        valid_to: '2023-08-25 12:00:00', //有效期至
      },
      { 
        brand: 'KATO-KATO', 
        product_code: '1000a2',
        product_name: 'KATO三次方奶酪遮瑕膏',
        selling_price: '8.21', 
        purchase_quantity: 2,  
        purchase_price: '8.00',
        text: '备注',
        leve1_class: '一级类目B',
        leve2_class: '二级类目B',

        price:'8.00', //售价
        discount: 0.2, //折扣
        sales_price: '8.00', //销售金额
        product_status_str: '彩妆', //产品类型
        create_time: '2023-7-28 15:22:22',
        seller_text: '', //卖方备注
        batch_number: '100002', //批次号
        valid_to: '2023-08-25 12:00:00', //有效期至
      },
      { 
        brand: 'KATO-KATO', 
        product_code: '1000a3',
        product_name: 'KATO-KATO贪玩假日水感防晒乳',
        selling_price: '8.00', 
        purchase_quantity: 7,  
        purchase_price: '',
        text: '备注',
        leve1_class: '一级类目C',
        leve2_class: '二级类目C',
        price:'8.00', //售价
        discount: 0.2, //折扣
        sales_price: '8.00', //销售金额
        product_status_str: '彩妆', //产品类型
        create_time: '2023-7-28 15:22:22',
        seller_text: '', //卖方备注
        batch_number: '100003', //批次号
        valid_to: '2023-08-25 12:00:00', //有效期至
      },
      { 
        brand: 'KATO-KATO', 
        product_code: '1000a4',
        product_name: 'KATO-KATO日常补给精细眼线胶笔(1.5mm)1失眠深夜',
        selling_price: '8.00', 
        purchase_quantity: 9,  
        purchase_price: '',
        text: '备注',
        leve1_class: '一级类目D',
        leve2_class: '二级类目D',
        price:'8.00', //售价
        discount: 0.2, //折扣
        sales_price: '8.00', //销售金额
        product_status_str: '彩妆', //产品类型
        create_time: '2023-7-28 15:22:22',
        seller_text: '', //卖方备注
        batch_number: '100004', //批次号
        valid_to: '2023-08-25 12:00:00', //有效期至
      },
    ]
  },
  {
    order_no: '20230601003',
    order_status: '4',
    order_status_str: '报价单待确认',
    buyer: '青岛美多乐有限公司',
    cgje: '3100',
    cgsl: '4411.00',
    fptt: '青岛美多乐有限公司',
    shzt: '2',
    shzt_str: '退货',//
    shdz: '山东省青岛市崂山区金家岭街道',
    affairs: '',
    seller: '伊拉克',
    create_p: '李华',
    create_time: '2023-07-28 14:22:23',
    qwys_type: '2',
    kplx_type: '1',
    address: '西仲花园18号楼6单元703',
    phone: '17852363573', //联系电话
    kplx: '2', //开票类型
    gssh_num: '10000021', // 公司税号
    fp_type: '1', //发票类型
    shlx_p: '特拉普', //收货联系人
    sales_status: '1', //售后状态
    sales_status_str: '退款', //售后状态 取消订单、退款、退货退款、换货
    goods_name: '产品名称A', //产品名称
    productList:[
      { 
        brand: '黛优佳', 
        product_code: '2000a1',
        product_name: '黛优佳氨基酸新杞洗面奶(新款）100g',
        selling_price: '25.00', 
        purchase_quantity: 3,  
        purchase_price: '',
        text: '备注',
        price:'8.00', //售价
        discount: 0.2, //折扣
        sales_price: '8.00', //销售金额
        product_status_str: '护肤品', //产品类型
        seller_text: '', //卖方备注
        create_time: '2023-7-28 15:22:22',
        batch_number: '200001', //批次号
        valid_to: '2023-08-25 12:00:00', //有效期至
      },
      { 
        brand: '黛优佳', 
        product_code: '2000a2',
        product_name: '产品黛优佳水盈皙透防晒霜40ml名称',
        selling_price: '30', 
        purchase_quantity: 2,  
        purchase_price: '',
        text: '备注',
        price:'8.00', //售价
        discount: 0.2, //折扣
        sales_price: '8.00', //销售金额
        product_status_str: '护肤品', //产品类型
        create_time: '2023-7-28 15:22:22',
        seller_text: '', //卖方备注
        batch_number: '200002', //批次号
        valid_to: '2023-08-25 12:00:00', //有效期至
      },
    ]
  },
  {
    order_no: '20230601002',
    order_status: '9',
    order_status_str: '确认收货',
    buyer: '青岛金多乐有限公司',
    cgje: '245',
    cgsl: '3100.00',
    fptt: '青岛美多乐有限公司',
    shzt: '',
    shzt_str: '',
    shdz: '山东省青岛市城阳区流亭街道',
    affairs: '',
    seller: '伊拉克',
    create_p: 'Join',
    create_time: '2023-07-28 14:22:23',
    qwys_type: '1',
    kplx_type: '1',
    address: '西仲花园18号楼6单元703',
    phone: '17852366666',
    kplx: '0', //开票类型
    gssh_num: '7777777', // 公司税号
    fp_type: '1', //发票类型
    shlx_p: 'B太', //收货联系人
    sales_status: '0', //售后状态
    sales_status_str: '取消订单', //售后状态 取消订单、退款、退货退款、换货
    goods_name: '产品名称A', //产品名称
    productList:[
      { 
        brand: '德妃', 
        product_code: '3000a1',
        product_name: '德妃紫苏舒缓爽肤水R4',
        selling_price: '60.00', 
        purchase_quantity: 1,  
        purchase_price: '',
        text: '备注',
        price:'8.00', //售价
        discount: 0.2, //折扣
        sales_price: '8.00', //销售金额
        product_status_str: '水', //产品类型
        seller_text: '', //卖方备注
        batch_number: '300001', //批次号
        valid_to: '2023-08-25 12:00:00', //有效期至
        create_time: '2023-7-28 15:22:22',
      },
      { 
        brand: '德妃', 
        product_code: '2000a2',
        product_name: '德妃紫苏舒缓乳液R4',
        selling_price: '75', 
        purchase_quantity: 2,  
        purchase_price: '',
        text: '备注',
        price:'8.00', //售价
        discount: 0.2, //折扣
        sales_price: '8.00', //销售金额
        product_status_str: '水', //产品类型
        seller_text: '', //卖方备注
        batch_number: '300002', //批次号
        valid_to: '2023-08-25 12:00:00', //有效期至
        create_time: '2023-7-28 15:22:22',
      },
    ]
  },
]

const cloums = [
  {
    label: '订单编号',
    prop: 'order_no',
    width: '120',
    tag: 'tag',
    tag_type: 'a',
  },
  {
    label: '订单状态',
    prop: 'order_status_str',
    width: '120',
    tag: 'tag',
    tag_type: 'order_status',
  },
  { label: '买方', prop: 'mfa', width: '180' },
  { label: '采购数量', prop: 'cgsl', type: 'number', width: '140' },
  {
    label: '采购金额',
    prop: 'cgje',
    type: 'money',
    outHidden: true,
    width: '140',
  },
  { label: '发票抬头', prop: 'fptt', width: '180' },
  { label: '收货地址', prop: 'shdz', width: '180' },
  { label: '售后状态', prop: 'shzt_str', width: '180' },
  { label: '卖方', prop: 'mf', width: '140' },
  { label: '卖方商务', prop: 'affairs', width: '140' },
  { label: '创建人', prop: 'create_p', width: '140' },
  { label: '创建时间', prop: 'create_time', width: '180' },
]

export default [
  {
    url: '/procure/orderTrack/list',
    method: 'post',
    response: () => {
      return {
        code: 200,
        msg: 'success',
        data: {
          count: orderTrack.length,
          list: orderTrack,
          cloums,
        },
      }
    },
  },
  
] as MockMethod[]
